package com.chat.admin.controller;


import com.chat.admin.domain.VO.RouteVO;
import com.chat.admin.service.IRouteInfoService;
import com.chat.common.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 管理员路口模块
 */
@RestController
@Validated
@RequestMapping("/admin")
public class RouteInfoController {
    @Autowired
    IRouteInfoService iRouteInfoService;

    /**
     * 获取全部路由
     * @return
     */
    @GetMapping("/route-info/all")
    public R<List<RouteVO>> getRouteALL() {
        return R.succeed(iRouteInfoService.getRouteInfoAll2());
    }
}
